Skip to content

Create new handlers for every new request in GoogleCloudStorageService#27339

Merged
tlrx merged 1 commit intoelastic:masterfrom
tlrx:fix-27092
Nov 14, 2017
Merged

Create new handlers for every new request in GoogleCloudStorageService#27339
tlrx merged 1 commit intoelastic:masterfrom
tlrx:fix-27092

Conversation

@tlrx
Copy link
Copy Markdown
Member

@tlrx tlrx commented Nov 10, 2017

This pull request changes the DefaultHttpRequestInitializer in order to make
it create new HttpIOExceptionHandler and HttpUnsuccessfulResponseHandler
for every new HTTP request instead of reusing the same two handlers for
all requests.

It also add a test for this and removes some unused attributes.

Closes #27092

This commit changes the DefaultHttpRequestInitializer in order to make
it create new HttpIOExceptionHandler and HttpUnsuccessfulResponseHandler
for every new HTTP request instead of reusing the same two handlers for
all requests.

Closes elastic#27092
@thkoch2001
Copy link
Copy Markdown

I have no dev environment to test me, but the code lgtm. Thank you.

};
assertSame(cred, service.getCredential("default"));

service.new DefaultHttpRequestInitializer(cred, null, null);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a typo? Not sure how this compiles...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a non-static inner class, that's the syntax for constructing an instance of an inner class that is tied to an instance of the outer class.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhh, it's been a long time since I have seen this syntax...

@tlrx tlrx merged commit dd51c23 into elastic:master Nov 14, 2017
@tlrx
Copy link
Copy Markdown
Member Author

tlrx commented Nov 14, 2017

Thanks @thkoch2001 and @rjernst

tlrx added a commit that referenced this pull request Nov 14, 2017
#27339)

This commit changes the DefaultHttpRequestInitializer in order to make
it create new HttpIOExceptionHandler and HttpUnsuccessfulResponseHandler
for every new HTTP request instead of reusing the same two handlers for
all requests.

Closes #27092
tlrx added a commit that referenced this pull request Nov 14, 2017
#27339)

This commit changes the DefaultHttpRequestInitializer in order to make
it create new HttpIOExceptionHandler and HttpUnsuccessfulResponseHandler
for every new HTTP request instead of reusing the same two handlers for
all requests.

Closes #27092
tlrx added a commit that referenced this pull request Nov 14, 2017
#27339)

This commit changes the DefaultHttpRequestInitializer in order to make
it create new HttpIOExceptionHandler and HttpUnsuccessfulResponseHandler
for every new HTTP request instead of reusing the same two handlers for
all requests.

Closes #27092
@tlrx tlrx deleted the fix-27092 branch November 14, 2017 11:09
@msahnawaz
Copy link
Copy Markdown

@tlrx : Will this be available in ES 6.0.1?

@tlrx
Copy link
Copy Markdown
Member Author

tlrx commented Nov 15, 2017

@msahnawaz Yes, that's what the tag v6.0.1 means when it is assigned to an issue.

martijnvg added a commit that referenced this pull request Nov 15, 2017
* es/master:
  Logging: Unify log rotation for index/search slow log (#27298)
  wildcard query on _index (#27334)
  REST spec: Validate that api name matches file name that contains it (#27366)
  Revert "Reduce synchronization on field data cache"
  Create new handlers for every new request in GoogleCloudStorageService (#27339)
  Rest test fixes (#27354)
martijnvg added a commit that referenced this pull request Nov 15, 2017
* es/6.x:
  Updated 6.0.0 release notes to include all changes from alpha, beta, RC
  wildcard query on _index (#27334)
  REST spec: Validate that api name matches file name that contains it (#27366)
  Revert "Reduce synchronization on field data cache"
  Create new handlers for every new request in GoogleCloudStorageService (#27339)
  Rest test fixes (#27354)
@clintongormley clintongormley added :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs and removed :Plugin Repository GCS labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants